package com.example.adminserivce.Service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.domain.dto.search.TeacherSearchDto;
import com.example.common.domain.pojo.Teacher;


// 教师服务接口
public interface TeacherService extends IService<Teacher> {
    //条件分页查找
    Page<Teacher> pageByCriteria(Page<Teacher> page, TeacherSearchDto teacherSearchDto);

    // 使用缓存穿透策略获取教师信息（防止 null 击穿）
    Teacher getTeacherById(String id);

    // 使用逻辑过期策略获取教师信息
    Teacher getTeacherByIdWithLogicalExpire(String id);

    Teacher saveTeacher(Teacher teacher);

    Teacher updateTeacher(Teacher teacher);

    void deleteTeacher(String id);
}
